package com.smartmedical.system.controller;

import com.smartmedical.system.domain.User;
import com.smartmedical.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/userH")
public class UserController {
    @Autowired
    private UserService userService;

    //通过邮箱查询用户
    @RequestMapping("/getUserByEmail")
    public User getUserByEmail(@RequestParam("email") String email) {
        User user =  userService.selectUserByUserName(email);
        return user;
    }
}
